/* 全局样式重置 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f0f2f5;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* 应用主容器 */
#root {
  height: 100vh;
}

/* 侧边栏样式 */
.logo {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #303030;
  margin-bottom: 16px;
  padding: 0 24px;
}

/* 页面容器样式 */
.routes-page,
.shipments-page,
.matching-page {
  min-height: 100%;
}

/* 统计卡片样式 */
.ant-statistic-title {
  color: #666;
  font-size: 14px;
  margin-bottom: 4px;
}

.ant-statistic-content {
  font-size: 24px;
  font-weight: 600;
}

/* 卡片标题样式 */
.ant-card-head-title {
  font-weight: 600;
  font-size: 16px;
}

/* 表格样式增强 */
.ant-table {
  border-radius: 8px;
  overflow: hidden;
}

.ant-table-thead > tr > th {
  background: #fafafa;
  font-weight: 600;
  color: #333;
}

.ant-table-tbody > tr:hover {
  background: #fafafa;
}

/* 按钮样式增强 */
.ant-btn-primary {
  border-radius: 6px;
}

.ant-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 标签样式增强 */
.ant-tag {
  border-radius: 4px;
  font-size: 12px;
  padding: 2px 8px;
}

/* 进度条样式 */
.ant-progress-line {
  font-size: 12px;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .ant-layout-sider {
    position: fixed;
    z-index: 1000;
    height: 100vh;
  }
  
  .ant-layout-content {
    margin-left: 0 !important;
  }
  
  .ant-layout-header {
    padding: 0 16px !important;
  }
}

/* 头部样式 */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: 100%;
}

.header-content .header-left {
  display: flex;
  align-items: center;
}

.header-content .header-right {
  display: flex;
  align-items: center;
}

.header-content .trigger {
  font-size: 18px;
  line-height: 64px;
  padding: 0 16px;
  cursor: pointer;
  transition: color 0.3s;
  margin-right: 16px;
}

.header-content .trigger:hover {
  color: #1890ff;
}

.header-content h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.header-content .system-name {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* 地图容器样式 */
.map-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 加载动画 */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

/* 错误提示样式 */
.error-message {
  text-align: center;
  padding: 48px;
  color: #ff4d4f;
}

.error-message .anticon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* 空状态样式 */
.empty-state {
  text-align: center;
  padding: 48px;
  color: #999;
}

.empty-state .anticon {
  font-size: 48px;
  margin-bottom: 16px;
  color: #d9d9d9;
}

/* 工具栏样式 */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

/* 搜索框样式 */
.search-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 卡片悬停效果 */
.ant-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 打印样式 */
@media print {
  .ant-layout-sider,
  .ant-layout-header {
    display: none !important;
  }
  
  .ant-layout-content {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .ant-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
  
  .ant-btn {
    display: none !important;
  }
}
